package com.kaifamiao.config;

import com.kaifamiao.advice.LogAdvice;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author lucien-ma
 * @date 2021/8/27
 * @apiNote
 */
@Configuration
@ComponentScan({"com.kaifamiao.service.impl", "com.kaifamiao.dao.impl"})
@EnableAspectJAutoProxy
public class SpringConfig {

    @Bean("logAdvice")
    public LogAdvice createLogAdvice() {
        return new LogAdvice();
    }
}
